package com.cmii.sjw.department.control.common;

import com.cmii.sjw.department.control.jsc.service.OneFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@EnableScheduling
public class ScheduledTasks {

    @Autowired
    private OneFormService oneFormService;

    // 每天凌晨执行一次，同步数据
/*    @Scheduled(cron = "0 0 0 * * ?")
    public void syncData() {
        String currentYear = String.valueOf(java.time.LocalDate.now().getYear());
        oneFormService.saveKpi(currentYear);
    }*/
}